package com.appwoo.txtws.app;

import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.content.Intent;
import android.view.LayoutInflater;
import android.widget.ArrayAdapter;
import android.widget.Toast;

public abstract class App
{
  private static AppActivity _appActivity;
  private static Activity currentActivity;
  private static Activity mainActivity;
  private static Activity screenActivity;
  private static Activity settingActivity;

  public static ArrayAdapter<String> buildArrayAdapter()
  {
    ArrayAdapter localArrayAdapter = new ArrayAdapter(currentActivity, 17367048);
    localArrayAdapter.setDropDownViewResource(17367049);
    return localArrayAdapter;
  }

  public static AlertDialog.Builder buildDialog()
  {
    return new AlertDialog.Builder(currentActivity);
  }

  public static Activity getCurrentActivity()
  {
    return currentActivity;
  }

  public static LayoutInflater getLayoutInflater()
  {
    return LayoutInflater.from(currentActivity);
  }

  public static Activity getMainActivity()
  {
    return mainActivity;
  }

  public static Activity getScreenActivity()
  {
    return settingActivity;
  }

  public static Activity getSettingActivity()
  {
    return settingActivity;
  }

  public static void initAppContext(Activity paramActivity)
  {
    currentActivity = paramActivity;
  }

  public static void initChildActivity(AppActivity paramAppActivity)
  {
    _appActivity = paramAppActivity;
  }

  public static void initMainContext(Activity paramActivity)
  {
    mainActivity = paramActivity;
  }

  public static void initScreenContext(Activity paramActivity)
  {
    settingActivity = paramActivity;
  }

  public static void initSettingContext(Activity paramActivity)
  {
    settingActivity = paramActivity;
  }

  public static void postRunnable(Runnable paramRunnable)
  {
    if (_appActivity != null)
      _appActivity.runOnUiThread(paramRunnable);
  }

  public static void startActivity(Intent paramIntent)
  {
    currentActivity.startActivity(paramIntent);
  }

  public static void toast(String paramString)
  {
    toast(paramString, 1);
  }

  public static void toast(String paramString, int paramInt)
  {
    try
    {
      Toast localToast = Toast.makeText(currentActivity, paramString, paramInt);
      localToast.setGravity(16, 0, 0);
      localToast.show();
      return;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.app.App
 * JD-Core Version:    0.6.2
 */